﻿using System;

namespace Borg
{
    [Serializable]
    public class SlotEventArgs : EventArgs
    {
        private readonly Slot _slot;

        public Slot Slot
        {
            get { return _slot; }
        }

        public SlotEventArgs(Slot slot)
        {
            if (slot == null)
                throw new ArgumentNullException("slot");
            
            _slot = slot;
        }

        public override bool Equals(object obj)
        {
            if (this == obj)
                return true;

            if (!(obj is SlotEventArgs))
                return false;
            
            return Equals(_slot, ((SlotEventArgs)obj)._slot);
        }

        public override int GetHashCode()
        {
            return _slot.GetHashCode();
        }
    }
}
